package com.basic.business.upDate.mapper;

import com.basic.business.upDate.domain.TGoodsUpDate;
import com.basic.common.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 商品上新日期管理Mapper接口
 *
 * @author zhaoxy_jn@163.com
 */
public interface TGoodsUpDateMapper extends BaseMapper<TGoodsUpDate> {

    /**
     * 批量插入或更新
     *
     * @param list
     */
    void batchInsertOrUpdate(@Param("list")List<TGoodsUpDate> list);

    /**
     * 根据商品ID更新上新日期
     * @param upNewDate
     * @param goodsId
     * @return
     */
    int updateDateByGoodsId(@Param("upNewDate") Date upNewDate, @Param("id") String goodsId);
}
